<?php use_stylesheet('forms.css') //load css ?>
<div id="nav">
        <ul>
            <a href="<?php echo url_for('sales_index_contacts') ?>"><li class="no_sel"><?php echo image_tag('Icons/ic_menu_contacts.png') ?>Contacts</li></a>
            <a href="<?php echo url_for('sales_index_orders') ?>"><li class="no_sel"><?php echo image_tag('Icons/ic_menu_orders.png') ?>Orders</li></a>
            <a href="<?php echo url_for('sales_index_pnp') ?>"><li class="no_sel"><span style="float: left;"><?php echo image_tag('Icons/ic_menu_products_parts.png') ?></span><span style="float: left; margin: -2px 0 0 0;">Materials</span><span style=" float: left; margin-top: -5px;">&amp; Products</span></li></a>
            <a href="<?php echo url_for('purchase_index') ?>"><li class="no_sel"><?php echo image_tag('Icons/ic_menu_purchase.png') ?>Purchase</li></a>
            <a href="<?php echo url_for('stock_index') ?>"><li class="no_sel"><?php echo image_tag('Icons/ic_menu_stock.png') ?>Stock</li></a>
            <?php if($sf_user->isSuperAdmin()){ ?>
            <a href="<?php echo url_for('admin_index') ?>"><li class="no_sel"><?php echo image_tag('Icons/ic_menu_stock.png') ?>Admin</li></a>
            <?php } ?>
        </ul>
</div>
<div id="page">
<?php
if ($tab == 'contacts') {
    echo '<h1>Add New Contact</h1>';
    include_partial('formContact', array('form' => $form));
}
if ($tab == 'orders') {
    echo '<h1>Add New Customer Order</h1>';
    include_partial('formOrder', array('form' => $form, 'products' => $products, 'parts' => $parts, 'version' => 'order', 'status' => '', 'category' => 'customer order'));
}
if ($tab == 'return') {
    echo '<h1>Add New Return Order</h1>';
    include_partial('formOrder', array('form' => $form, 'version' => 'return'));
}
if ($tab == 'stock') {
    echo '<h1>Add New Stock Order</h1>';
    include_partial('formOrder', array('form' => $form, 'products' => $products, 'version' => 'stock', 'status' => '', 'category' => 'stock order'));
}
if ($tab == 'products') {
    echo '<h1>Add New Product</h1>';
    include_partial('formProduct', array('form' => $form, 'parts' => $parts));
}
if ($tab == 'parts') {
    echo '<h1>Add New Material</h1>';
    include_partial('formPart', array('form' => $form));
}
if ($tab == 'priceList') {
    echo '<h1>Create Price List</h1>';
    include_partial('formPriceList', array('products' => $products, 'parts' => $parts));
}
if ($tab == 'print') {
    include_partial('formPrintDocument', array('order' => $order));
}
?>
</div>